public class Dog implements IAnimal {
    private String name;

    public Dog () {
	this ("");
    }

    public Dog (String name) {
	this.name = name;
    }

    public boolean couldEat (IAnimal obj) {
	if (obj instanceof Dog) {
	    return false;
	} else if (obj instanceof Cat || obj instanceof Frog) {
	    return true;
	}

	return false;
    }

    public String getName () {
	return this.name;
    }

    public String getType (boolean definiteArticle) {
	if (definiteArticle) {
	    return "кучето";
	} else {
	    return "куче";
	}
    }

    public void talk () {
	System.out.println (Main.uppercaseFirst (this.getType (true))
			    + name + " казва \"Бау!\"");
    }
}
